Carbon


FilePlayCompletionProcPtr

Header: Sound.h Carbon status: Supported

Defines a pointer to a sound completion callback function. Your sound completion function executes when a play from disk finishes.

typedef void(* FilePlayCompletionProcPtr) (
    SndChannelPtr chan
);

You would declare your function like this if you were to name it MyFilePlayCompletionCallback:

void MyFilePlayCompletionCallback (
    SndChannelPtr chan
);
Parameter descriptions
chan

A pointer to the sound channel on which a play from disk has completed.

DISCUSSION

The Sound Manager executes your completion function when a play from disk on the channel specified by the chan parameter finishes (unless sound play was stopped by the SndStopFilePlay function).

Use the completion function to set a global flag that alerts the application that it must dispose of the sound channel.

You can specify a completion function as the seventh parameter to the SndStartFilePlay function.

SPECIAL CONSIDERATIONS

A completion function is called at interrupt time. It must not make any calls to the Memory Manager, either directly or indirectly. If your completion function needs to access your application’s global variables, you must ensure that register A5 contains your application’s A5. (You can use the userInfo field of the sound channel pointed to by the chan parameter to pass that value to your completion function.)


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)